﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HelloMinasan.Domain;
using System.ComponentModel.DataAnnotations;

namespace HelloMinasan.Web.ViewModels
{
    public class SendMessageModel
    {
        public SendMessageModel()
        {
            TotalPersons = 0;
        }

        public int Id { get; set; }
        public User Sender { get; set; }        
        public User Receiver { get; set; }
       
        //[Required(ErrorMessage="Subject is required")]
        [StringLength(50, ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "InValidMaxSize")]
        public string Subject { get; set; }

        [Required(ErrorMessage = "Body is required")]
        public string Body { get; set; }
        
        public MessageSystemFolder MessageSystemFolder { get; set; }

        public TypeReceiverMessage TypeReceiver { get; set; }
        public bool IsReply { get; set; }
        public string ReceiverId { get; set; }

        public string ListReceiver { get; set; }

        /// <summary>
        /// Add for show empty popup if empty vocabularies, colleagues or friend
        /// </summary>
        public int TotalPersons { get; set; }
    }

    public enum TypeReceiverMessage
    {
        Member,
        Colleague,
        Friend,
        IsReadOnlyReceiver
    }
}